package com.hsmpay.yl8583.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Administrator on 2015/6/26.
 */
public class PospSpringUtil {
    private static final ApplicationContext app = buildApplicationContext();

    private static ApplicationContext buildApplicationContext() {
        try {
            return new ClassPathXmlApplicationContext("pospConfig.xml");
        }catch (Throwable e) {
            System.err.println("Initial pospConfig.xml failed:" + e);
            throw new ExceptionInInitializerError();
        }
    }
    public static ApplicationContext getApplicationContext(){return app;}

}
